package com.jie.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Author: 杰
 * @Project :net-disk
 * @DateTime: 2024/4/19 16:31
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class VideoDTO {
    private Integer id;

    //运动名称
    private String sportName;

    //运动描述信息
    private String sportInfo;

    //运动钟类
    private String sportClass;

    //运动数量
    private Integer sportCount;

    //视频资源路径
    private String sportVideo;

    //消耗大卡
    private Integer consumable;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 格式化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

}
